﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace NMF.Optimizations
{
    public interface IObservableSource<out T> : IEnumerable<T>
    {
        void Subscribe(ISourceObserver<T> observer);
        bool Unsubscribe(Predicate<object> filter);
    }

    public interface ISourceObserver<in T>
    {
        void OnNewItem(T item);
        void OnUpdatedItem(T item);
        void OnDeletedItem(T item);
        void OnReset();
    }
}
